CC=gcc
CFLAGS=-ggdb -Wall -pedantic -std=c99
LDFLAGS=-L/usr/lib64/mysql -lbluetooth -lcurl -lmysqlclient -lm

HEADER=pvlogger.h logging.h

OBJS=hexdump.o sunlight.o smatool.o logging.o bluetooth.o \
  timestamp.o

.PHONY: all
all: pvlogger

pvlogger: ${OBJS}
	${CC} ${CFLAGS} -o pvlogger ${OBJS} ${LDFLAGS}

%.o: %.c ${HEADER}
	$(CC) ${CFLAGS} ${INCLUDES} -c -o $@ $<

.PHONY: clean
clean:
	rm -f *.o pvlogger
	
